package router

import (
	"github.com/gin-gonic/gin"
	"kuangstudy-mall/apis/goods-web/api"
	middlewares "kuangstudy-mall/apis/goods-web/middleawares"
)

func InitGoodsRouter(RouterGroup *gin.RouterGroup) {
	userRouter := RouterGroup.Group("/goods").Use(middlewares.JWTAuth(), middlewares.Trace())
	{
		userRouter.POST("/list", (&api.GoodsApi{}).FindGoodsList)
		userRouter.GET("/detail/:id", (&api.GoodsApi{}).GetGoodsDetail)
		userRouter.POST("/banner/list", (&api.GoodsApi{}).FindBannerList)
		userRouter.POST("/category/index", (&api.GoodsApi{}).FindCategoryListToIndex)
		userRouter.POST("/category/list", (&api.GoodsApi{}).FindCategoryList)
	}
}
